summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-07 15:25:12 +0100
committerLiam <byteslice@airmail.cc>2023-03-13 03:09:09 +0100
commit9368e17a92815744ffed8db7a0fd638708426879 (patch)
tree006dfb49277dbb5a899d68b69f9cfd543d349f1a
parentkernel/svc: convert to new style (diff)
downloadyuzu-9368e17a92815744ffed8db7a0fd638708426879.tar
yuzu-9368e17a92815744ffed8db7a0fd638708426879.tar.gz
yuzu-9368e17a92815744ffed8db7a0fd638708426879.tar.bz2
yuzu-9368e17a92815744ffed8db7a0fd638708426879.tar.lz
yuzu-9368e17a92815744ffed8db7a0fd638708426879.tar.xz
yuzu-9368e17a92815744ffed8db7a0fd638708426879.tar.zst
yuzu-9368e17a92815744ffed8db7a0fd638708426879.zip
-rw-r--r--src/core/hle/kernel/global_scheduler_context.h4
-rw-r--r--src/core/hle/kernel/k_code_memory.h2
-rw-r--r--src/core/hle/kernel/k_debug.h2
-rw-r--r--src/core/hle/kernel/k_memory_block.h30
-rw-r--r--src/core/hle/kernel/k_page_buffer.h2
-rw-r--r--src/core/hle/kernel/k_resource_limit.h2
-rw-r--r--src/core/hle/kernel/k_system_resource.cpp9
-rw-r--r--src/core/hle/kernel/k_system_resource.h2
8 files changed, 24 insertions, 29 deletions
diff --git a/src/core/hle/kernel/global_scheduler_context.h b/src/core/hle/kernel/global_scheduler_context.h
index b7fb8caec..c48e8cd12 100644
--- a/src/core/hle/kernel/global_scheduler_context.h
+++ b/src/core/hle/kernel/global_scheduler_context.h
@@ -44,7 +44,7 @@ public:
/// Returns a list of all threads managed by the scheduler
/// This is only safe to iterate while holding the scheduler lock
- [[nodiscard]] const std::vector<KThread*>& GetThreadList() const {
+ const std::vector<KThread*>& GetThreadList() const {
return m_thread_list;
}
@@ -64,7 +64,7 @@ public:
void RegisterDummyThreadForWakeup(KThread* thread);
void WakeupWaitingDummyThreads();
- [[nodiscard]] LockType& SchedulerLock() {
+ LockType& SchedulerLock() {
return m_scheduler_lock;
}
diff --git a/src/core/hle/kernel/k_code_memory.h b/src/core/hle/kernel/k_code_memory.h
index 5b260b385..fa63c18df 100644
--- a/src/core/hle/kernel/k_code_memory.h
+++ b/src/core/hle/kernel/k_code_memory.h
@@ -42,7 +42,7 @@ public:
bool IsInitialized() const override {
return m_is_initialized;
}
- static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
+ static void PostDestroy(uintptr_t arg) {}
KProcess* GetOwner() const override {
return m_owner;
diff --git a/src/core/hle/kernel/k_debug.h b/src/core/hle/kernel/k_debug.h
index e3a0689c8..9ffcf27d1 100644
--- a/src/core/hle/kernel/k_debug.h
+++ b/src/core/hle/kernel/k_debug.h
@@ -14,7 +14,7 @@ class KDebug final : public KAutoObjectWithSlabHeapAndContainer<KDebug, KAutoObj
public:
explicit KDebug(KernelCore& kernel_) : KAutoObjectWithSlabHeapAndContainer{kernel_} {}
- static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
+ static void PostDestroy(uintptr_t arg) {}
};
} // namespace Kernel
diff --git a/src/core/hle/kernel/k_memory_block.h b/src/core/hle/kernel/k_memory_block.h
index 87ca65592..e01929da6 100644
--- a/src/core/hle/kernel/k_memory_block.h
+++ b/src/core/hle/kernel/k_memory_block.h
@@ -471,8 +471,8 @@ public:
m_disable_merge_attribute & KMemoryBlockDisableMergeAttribute::AllRight);
}
- constexpr void UpdateDeviceDisableMergeStateForShareLeft(
- [[maybe_unused]] KMemoryPermission new_perm, bool left, [[maybe_unused]] bool right) {
+ constexpr void UpdateDeviceDisableMergeStateForShareLeft(KMemoryPermission new_perm, bool left,
+ bool right) {
// New permission/right aren't used.
if (left) {
m_disable_merge_attribute = static_cast<KMemoryBlockDisableMergeAttribute>(
@@ -482,8 +482,8 @@ public:
}
}
- constexpr void UpdateDeviceDisableMergeStateForShareRight(
- [[maybe_unused]] KMemoryPermission new_perm, [[maybe_unused]] bool left, bool right) {
+ constexpr void UpdateDeviceDisableMergeStateForShareRight(KMemoryPermission new_perm, bool left,
+ bool right) {
// New permission/left aren't used.
if (right) {
m_disable_merge_attribute = static_cast<KMemoryBlockDisableMergeAttribute>(
@@ -499,8 +499,7 @@ public:
this->UpdateDeviceDisableMergeStateForShareRight(new_perm, left, right);
}
- constexpr void ShareToDevice([[maybe_unused]] KMemoryPermission new_perm, bool left,
- bool right) {
+ constexpr void ShareToDevice(KMemoryPermission new_perm, bool left, bool right) {
// New permission isn't used.
// We must either be shared or have a zero lock count.
@@ -516,8 +515,8 @@ public:
this->UpdateDeviceDisableMergeStateForShare(new_perm, left, right);
}
- constexpr void UpdateDeviceDisableMergeStateForUnshareLeft(
- [[maybe_unused]] KMemoryPermission new_perm, bool left, [[maybe_unused]] bool right) {
+ constexpr void UpdateDeviceDisableMergeStateForUnshareLeft(KMemoryPermission new_perm,
+ bool left, bool right) {
// New permission/right aren't used.
if (left) {
@@ -536,8 +535,8 @@ public:
}
}
- constexpr void UpdateDeviceDisableMergeStateForUnshareRight(
- [[maybe_unused]] KMemoryPermission new_perm, [[maybe_unused]] bool left, bool right) {
+ constexpr void UpdateDeviceDisableMergeStateForUnshareRight(KMemoryPermission new_perm,
+ bool left, bool right) {
// New permission/left aren't used.
if (right) {
@@ -556,8 +555,7 @@ public:
this->UpdateDeviceDisableMergeStateForUnshareRight(new_perm, left, right);
}
- constexpr void UnshareToDevice([[maybe_unused]] KMemoryPermission new_perm, bool left,
- bool right) {
+ constexpr void UnshareToDevice(KMemoryPermission new_perm, bool left, bool right) {
// New permission isn't used.
// We must be shared.
@@ -575,8 +573,7 @@ public:
this->UpdateDeviceDisableMergeStateForUnshare(new_perm, left, right);
}
- constexpr void UnshareToDeviceRight([[maybe_unused]] KMemoryPermission new_perm, bool left,
- bool right) {
+ constexpr void UnshareToDeviceRight(KMemoryPermission new_perm, bool left, bool right) {
// New permission isn't used.
// We must be shared.
@@ -594,7 +591,7 @@ public:
this->UpdateDeviceDisableMergeStateForUnshareRight(new_perm, left, right);
}
- constexpr void LockForIpc(KMemoryPermission new_perm, bool left, [[maybe_unused]] bool right) {
+ constexpr void LockForIpc(KMemoryPermission new_perm, bool left, bool right) {
// We must either be locked or have a zero lock count.
ASSERT((m_attribute & KMemoryAttribute::IpcLocked) == KMemoryAttribute::IpcLocked ||
m_ipc_lock_count == 0);
@@ -626,8 +623,7 @@ public:
}
}
- constexpr void UnlockForIpc([[maybe_unused]] KMemoryPermission new_perm, bool left,
- [[maybe_unused]] bool right) {
+ constexpr void UnlockForIpc(KMemoryPermission new_perm, bool left, bool right) {
// New permission isn't used.
// We must be locked.
diff --git a/src/core/hle/kernel/k_page_buffer.h b/src/core/hle/kernel/k_page_buffer.h
index cfedaae61..b7a3ccb4a 100644
--- a/src/core/hle/kernel/k_page_buffer.h
+++ b/src/core/hle/kernel/k_page_buffer.h
@@ -29,7 +29,7 @@ public:
static KPageBuffer* FromPhysicalAddress(Core::System& system, PAddr phys_addr);
private:
- [[maybe_unused]] alignas(PageSize) std::array<u8, PageSize> m_buffer{};
+ alignas(PageSize) std::array<u8, PageSize> m_buffer{};
};
static_assert(sizeof(KPageBuffer) == KPageBufferSlabHeap::BufferSize);
diff --git a/src/core/hle/kernel/k_resource_limit.h b/src/core/hle/kernel/k_resource_limit.h
index 2573d1b7c..bc4f48e15 100644
--- a/src/core/hle/kernel/k_resource_limit.h
+++ b/src/core/hle/kernel/k_resource_limit.h
@@ -46,7 +46,7 @@ public:
void Release(LimitableResource which, s64 value);
void Release(LimitableResource which, s64 value, s64 hint);
- static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
+ static void PostDestroy(uintptr_t arg) {}
private:
using ResourceArray = std::array<s64, static_cast<std::size_t>(LimitableResource::Count)>;
diff --git a/src/core/hle/kernel/k_system_resource.cpp b/src/core/hle/kernel/k_system_resource.cpp
index 4cc377a6c..e6c8d589a 100644
--- a/src/core/hle/kernel/k_system_resource.cpp
+++ b/src/core/hle/kernel/k_system_resource.cpp
@@ -5,9 +5,8 @@
namespace Kernel {
-Result KSecureSystemResource::Initialize([[maybe_unused]] size_t size,
- [[maybe_unused]] KResourceLimit* resource_limit,
- [[maybe_unused]] KMemoryManager::Pool pool) {
+Result KSecureSystemResource::Initialize(size_t size, KResourceLimit* resource_limit,
+ KMemoryManager::Pool pool) {
// Unimplemented
UNREACHABLE();
}
@@ -17,8 +16,8 @@ void KSecureSystemResource::Finalize() {
UNREACHABLE();
}
-size_t KSecureSystemResource::CalculateRequiredSecureMemorySize(
- [[maybe_unused]] size_t size, [[maybe_unused]] KMemoryManager::Pool pool) {
+size_t KSecureSystemResource::CalculateRequiredSecureMemorySize(size_t size,
+ KMemoryManager::Pool pool) {
// Unimplemented
UNREACHABLE();
}
diff --git a/src/core/hle/kernel/k_system_resource.h b/src/core/hle/kernel/k_system_resource.h
index 9a991f725..aec058a95 100644
--- a/src/core/hle/kernel/k_system_resource.h
+++ b/src/core/hle/kernel/k_system_resource.h
@@ -99,7 +99,7 @@ public:
bool IsInitialized() const {
return m_is_initialized;
}
- static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
+ static void PostDestroy(uintptr_t arg) {}
size_t CalculateRequiredSecureMemorySize() const {
return CalculateRequiredSecureMemorySize(m_resource_size, m_resource_pool);